package ooday05;

public class StaticMethod {
    int a = 1;
    static int b = 2;

    void show() {
        System.out.println(this.a);
        System.out.println(StaticMethod.b);
    }

    static void test() {
        // System.out.println(a); 编译错误，静态方法中不能直接访问实例成员
        System.out.println(b);
        System.out.println(StaticMethod.b); //两者一样
    }
}
